package org.example.back.mapper.user;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.example.back.entity.user.UserPlan;


import java.util.List;
import java.time.LocalDate;
@Mapper
public interface UserPlanMapper {
    //插入计划信息
    int insert(UserPlan plan);
    //更新计划信息
    int update(UserPlan plan);
    //删除计划
    int delete(@Param("userId") Integer userId, @Param("planTime") LocalDate planTime);
    //查找计划
    UserPlan findById(@Param("id") Integer id, @Param("userId") Integer userId);
    //
    List<UserPlan> findByUserId(@Param("userId") Integer userId);

}
